// 处理时间
export const formatDuration = (duration) => {
  // Math.ceil() 函数返回大于或等于一个给定数字的最小整数。
  let min = Math.ceil(duration / 1000 / 600);
  min = min < 10 ? "0" + min : min;
  let sec = Math.ceil((duration / 1000) % 60);
  sec = sec < 10 ? "0" + sec : sec;
  return min + ":" + sec;
};

export const formatCount = (count) => {
  if (count / 1000 > 10) {
    return parseInt(count / 1000) + "万";
  } else {
    return count;
  }
};
